(defun term(i)
  (if (= 1 i) 2
	(if (zerop (mod i 3))
	    (* 2 (/ i 3))
	    1))))

(defun approx-e(iters &optional (c 1))
  (if (= c iters) (term c)
	  (+ (term c) (/ 1 (approx-e iters (1+ c))))))

(defun probl065()
  (reduce #'+ (digits (numerator (approx-e 100)))))

